package com.example.prom.dangwen.y2023.thread;

import java.util.Arrays;
import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // 输入人数
//        System.out.print("请输入人数：");
        int n = scanner.nextInt();

        // 输入年龄
        int[] ages = new int[n];
//        System.out.print("请输入年龄（用空格分隔）：");
        for (int i = 0; i < n; i++) {
            ages[i] = scanner.nextInt();
        }

        // 计算年龄总和
        int sum = Arrays.stream(ages).sum();

        // 判断是否可以分配为两个队伍
        if (sum % 2 == 0) {
            int targetSum = sum / 2; // 目标年龄总和
            boolean[][] dp = new boolean[n + 1][targetSum + 1];
            dp[0][0] = true;

            for (int i = 1; i <= n; i++) {
                for (int j = 0; j <= targetSum; j++) {
                    dp[i][j] = dp[i - 1][j];
                    if (j >= ages[i - 1]) {
                        dp[i][j] = dp[i][j] || dp[i - 1][j - ages[i - 1]];
                    }
                }
            }

            if (dp[n][targetSum]) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }

        scanner.close();
    }
}
